var convert = function (s, numRows) {
    let n = s.length;
    let _s = '';
    if (numRows == 1) {
        return s;
    }
    for (let k = 0; k < numRows; k++) {
        let line = k;
        let odd = false;
        while (line < n) {
            _s += s[line];
            console.log(_s, line, k)
            if (k === 0 || k === numRows - 1) {
                line += 2 * numRows - 2;
            } else {
                if (odd) {
                    line += 2 * k;
                    odd = false;
                } else {
                    line += 2 * numRows - 2 - 2 * k;
                    odd = true;
                }
            }
        }
    }
    return _s;
};

// 二维数组、矩阵
